package com.yunshipei.manager;

import android.content.Context;
import android.content.SharedPreferences;

import com.yunshipei.common.Globals;

public class YspPreferences {

    private SharedPreferences sharedPreferences;

    private YspPreferences() {
    }

    private static final class PreferencesInner {
        private static final YspPreferences instances = new YspPreferences();
    }

    public void init(Context context) {
        sharedPreferences = context.getSharedPreferences(Globals.YSP_PREFERENCES, Context.MODE_PRIVATE);
    }

    public static YspPreferences getInstance() {
        return PreferencesInner.instances;
    }

    public SharedPreferences getSharedPreferences() {
        return sharedPreferences;
    }
}